import React,{Component}from'react'
class ClickHere extends Component{
    constructor(props){
        super(props)
        this.onClickButton = this.onClickButton.bind(this)
        this.state = {count:0}
    }
    onClickButton(){
        this.setState({count:this.state.count+1})
    }
    render(){
        const thisStyle = {
            width:'100px',
            height:'30px',
            marginLeft:'10px'
        }
        return(
            <div>
                <input type="text" value = {this.state.count}/>
                <button style={thisStyle} onClick = {this.onClickButton}>{this.state.count}</button>
            </div>
        )
    }
}
export default ClickHere